#include "getfriendrequest.h"
#include "getfriendresponse.h"

#include <QUrl>


GetFriendIdRequest::GetFriendIdRequest(qint64 userId, int page):
      m_response(new GetFriendIdResponse(this)),
      m_userId(userId),
      m_page(page)
{
}


const Network::JSONResponse &GetFriendIdRequest::jsonResponse() const
{
    return *m_response;
}


Network::JSONResponse &GetFriendIdRequest::jsonResponse()
{
    return *m_response;
}

//---------------------------------------------------------------------------------------
QUrl GetFriendIdRequest::url() const
{

    QString url = QString("http://mapi2.me.zing.vn/frs/mapi2/friend?method=friend.getfids&userId=%1&page=%2&records=%3")
            .arg(m_userId).arg(m_page).arg(100);
    return QUrl(url);
}


void GetFriendIdRequest::setPage(int page)
{
    m_page = page;
}
